initialiseDefaultInstance

Initialise the default instance of SDK with configuration provided in MoEngage

Since

12.0.00

Parameters

moEngage

: Instance of MoEngage

Throws

if the SDK is not able initialise to due to mandatory configuration


Initialise the default instance of SDK with configuration provided in MoEngage and SDK state, i.e. whether the SDK should be in enabled or disabled state.

By default, the SDK is enabled. Use this API only if you have a requirement to enable/disable SDK, else use MoEngage.initialiseDefaultInstance.

Note: State is persisted across session, once the SDK is disabled it will remain in disabled state until enabled again.

Since

12.0.00

Parameters

moEngage

: Instance of MoEngage

Throws

if the SDK is not able initialise to due to mandatory configuration


fun initialiseDefaultInstance(application: Application, workspaceId: String, dataCenter: DataCenter, builderConfig: MoEngage.Builder.() -> Unit)

Initialise the default instance of SDK with configuration provided in the builderConfig

Since

13.06.00

Parameters

application

Instance of Application

workspaceId

Workspace Id from MoEngage Dashboard.

dataCenter

Data Center to in which MoEngage Account is created.

builderConfig

Configuration for initialising the SDK.

Throws

if the SDK is not able initialise to due to mandatory configuration


fun initialiseDefaultInstance(application: Application, workspaceId: String, dataCenter: DataCenter, sdkState: SdkState, builderConfig: MoEngage.Builder.() -> Unit)

Initialise the default instance of SDK with configuration provided in the builderConfig and SDK state, i.e. whether the SDK should be in enabled or disabled state. By default, the SDK is enabled. Use this API only if you have a requirement to enable/disable SDK.

Note: State is persisted across session, once the SDK is disabled it will remain in disabled state until enabled again.

Since

13.06.00

Parameters

application

Instance of Application

workspaceId

Workspace Id from MoEngage Dashboard.

dataCenter

Data Center to in which MoEngage Account is created.

sdkState

Instance of SdkState

builderConfig

Configuration for initialising the SDK.

Throws

if the SDK is not able initialise to due to mandatory configuration


Initialise the default instance of SDK with configuration provided in the XML as a resource

Return

the workspaceId if the SDK Initialisation is successful, else null.

Since

Todo: Add Version

Parameters

application

Instance of Application

sdkState

instance of SdkState

Throws

if the SDK is not able initialise to due to mandatory configuration

if the provided configurations are not align with the SDK requirements